﻿<!--#include file="inc/common.asp" -->
<HTML>
<HEAD><TITLE><%=blogObj.blogTitle%></TITLE>
<link rel="stylesheet" href="list.css" type="text/css" />
</HEAD>

<body>
<%
    call openDB
    dim blog_id, content_id, page_no , record_count,page_count ,page_size,  i
    page_size = 100
    page_no = request("page_no")
    if page_no=""  then
        page_no = 1
    else
        page_no = clng(page_no)    
    end if    
    'response.write page_no
    sql = " select  insert_time, url, referer,remote_host from blog_referer where 1=1 "
    blog_id = trim(request("blog_id"))
    if blog_id="" then
      blog_id = trim(request("bid"))
    end if
    if blog_id<>"" then
        blog_id = clng(blog_id)
        sql = sql & " and blog_id=" & blog_id &" "
    end if
    content_id = trim(request("content_id"))
    if content_id<>"" then
        content_id = clng(content_id)
        sql = sql & " and content_id=" & content_id & " "
    end if
    sql = sql & " order by insert_time desc "
    rs.open sql, conn, 1, 1
    'if not rs.eof then
%>
<table align=center width=100%>
    <tr>
      <td ><strong>when</strong></td>
      <td><strong>where</strong></td>
      <td><strong>from</strong></td>
      <td><strong>who</strong></td>
    </tr>
<%
        record_count = rs.recordCount
        rs.pageSize=page_size
        page_count = rs.pageCount
        if record_count>0 then
            rs.absolutePage=page_no
            i=0
            do while not rs.eof and i<page_size
                i = i+1
%>    
    <tr>
      <td ><%=rs(0)%></td>
      <td><a href=<%=rs(1)%>><%=left(rs(1),50)%></a></td>
      <td><a href=<%=rs(2)%> target="_blank"><%=left(rs(2),60)%></a></td>
      <td><%=rs(3)%></td>
    </tr>
<%
                rs.moveNext
            loop
        end if    
%>
</table>
<p align= center>
<%
        response.write(getPageLink(page_count, page_no, page_size, record_count, "refer.asp?blog_id="&blog_id&"&content_id="&content_id, "page_no"))
    'else
    '    response.write "没有数据"    
    'end if    
%> 
</p>   
</body>
</HTML>
<!--#include file="inc/end.asp" -->